<?php
include 'user.php';

  //unset all variables
  session_destroy();
  session_start();
  $_SESSION['username'] = NULL;
  $_SESSION['loggedin'] = false;
  header('Refresh:0;url=index.php');
?>